3.65 \(\int \cos ^4(c+d x) (a+i a \tan (c+d x))^5 \, dx\)

Optimal. Leaf size=73 \[ -\frac{2 i a^7}{d (a-i a \tan (c+d x))^2}+\frac{4 i a^6}{d (a-i a \tan (c+d x))}-\frac{i a^5 \log (\cos (c+d x))}{d}+a^5 x \]

[Out]

a^5*x - (I*a^5*Log[Cos[c + d*x]])/d - ((2*I)*a^7)/(d*(a - I*a*Tan[c + d*x])^2) + ((4*I)*a^6)/(d*(a - I*a*Tan[c
 + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0550322, antiderivative size = 73, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.083, Rules used = {3487, 43} \[ -\frac{2 i a^7}{d (a-i a \tan (c+d x))^2}+\frac{4 i a^6}{d (a-i a \tan (c+d x))}-\frac{i a^5 \log (\cos (c+d x))}{d}+a^5 x \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4*(a + I*a*Tan[c + d*x])^5,x]

[Out]

a^5*x - (I*a^5*Log[Cos[c + d*x]])/d - ((2*I)*a^7)/(d*(a - I*a*Tan[c + d*x])^2) + ((4*I)*a^6)/(d*(a - I*a*Tan[c
 + d*x]))

Rule 3487

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Dist[1/(a^(m - 2)*b
*f), Subst[Int[(a - x)^(m/2 - 1)*(a + x)^(n + m/2 - 1), x], x, b*Tan[e + f*x]], x] /; FreeQ[{a, b, e, f, n}, x
] && EqQ[a^2 + b^2, 0] && IntegerQ[m/2]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \cos ^4(c+d x) (a+i a \tan (c+d x))^5 \, dx &=-\frac{\left (i a^5\right ) \operatorname{Subst}\left (\int \frac{(a+x)^2}{(a-x)^3} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=-\frac{\left (i a^5\right ) \operatorname{Subst}\left (\int \left (\frac{4 a^2}{(a-x)^3}-\frac{4 a}{(a-x)^2}+\frac{1}{a-x}\right ) \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=a^5 x-\frac{i a^5 \log (\cos (c+d x))}{d}-\frac{2 i a^7}{d (a-i a \tan (c+d x))^2}+\frac{4 i a^6}{d (a-i a \tan (c+d x))}\\ \end{align*}

Mathematica [A]  time = 0.625467, size = 110, normalized size = 1.51 \[ \frac{a^5 (\cos (2 c+7 d x)+i \sin (2 c+7 d x)) \left (\cos (2 (c+d x)) \left (-i \log \left (\cos ^2(c+d x)\right )+2 d x-i\right )+\sin (2 (c+d x)) \left (-\log \left (\cos ^2(c+d x)\right )-2 i d x+1\right )+2 i\right )}{2 d (\cos (d x)+i \sin (d x))^5} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4*(a + I*a*Tan[c + d*x])^5,x]

[Out]

(a^5*(2*I + Cos[2*(c + d*x)]*(-I + 2*d*x - I*Log[Cos[c + d*x]^2]) + (1 - (2*I)*d*x - Log[Cos[c + d*x]^2])*Sin[
2*(c + d*x)])*(Cos[2*c + 7*d*x] + I*Sin[2*c + 7*d*x]))/(2*d*(Cos[d*x] + I*Sin[d*x])^5)

________________________________________________________________________________________

Maple [B]  time = 0.069, size = 146, normalized size = 2. \begin{align*}{\frac{-{\frac{5\,i}{4}}{a}^{5} \left ( \cos \left ( dx+c \right ) \right ) ^{4}}{d}}-{\frac{i{a}^{5}\ln \left ( \cos \left ( dx+c \right ) \right ) }{d}}-{\frac{{\frac{i}{2}}{a}^{5} \left ( \sin \left ( dx+c \right ) \right ) ^{2}}{d}}-{\frac{5\,{a}^{5}\cos \left ( dx+c \right ) \left ( \sin \left ( dx+c \right ) \right ) ^{3}}{4\,d}}-{\frac{11\,{a}^{5}\sin \left ( dx+c \right ) \cos \left ( dx+c \right ) }{4\,d}}+{a}^{5}x+{\frac{{a}^{5}c}{d}}-{\frac{{\frac{11\,i}{4}}{a}^{5} \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{d}}+{\frac{11\,{a}^{5}\sin \left ( dx+c \right ) \left ( \cos \left ( dx+c \right ) \right ) ^{3}}{4\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4*(a+I*a*tan(d*x+c))^5,x)

[Out]

-5/4*I/d*a^5*cos(d*x+c)^4-I*a^5*ln(cos(d*x+c))/d-1/2*I/d*a^5*sin(d*x+c)^2-5/4/d*a^5*cos(d*x+c)*sin(d*x+c)^3-11
/4/d*a^5*sin(d*x+c)*cos(d*x+c)+a^5*x+1/d*a^5*c-11/4*I/d*a^5*sin(d*x+c)^4+11/4/d*a^5*sin(d*x+c)*cos(d*x+c)^3

________________________________________________________________________________________

Maxima [A]  time = 1.80468, size = 119, normalized size = 1.63 \begin{align*} \frac{8 \,{\left (d x + c\right )} a^{5} + 4 i \, a^{5} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) - \frac{32 \, a^{5} \tan \left (d x + c\right )^{3} - 48 i \, a^{5} \tan \left (d x + c\right )^{2} - 16 i \, a^{5}}{\tan \left (d x + c\right )^{4} + 2 \, \tan \left (d x + c\right )^{2} + 1}}{8 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+I*a*tan(d*x+c))^5,x, algorithm="maxima")

[Out]

1/8*(8*(d*x + c)*a^5 + 4*I*a^5*log(tan(d*x + c)^2 + 1) - (32*a^5*tan(d*x + c)^3 - 48*I*a^5*tan(d*x + c)^2 - 16
*I*a^5)/(tan(d*x + c)^4 + 2*tan(d*x + c)^2 + 1))/d

________________________________________________________________________________________

Fricas [A]  time = 1.15905, size = 142, normalized size = 1.95 \begin{align*} \frac{-i \, a^{5} e^{\left (4 i \, d x + 4 i \, c\right )} + 2 i \, a^{5} e^{\left (2 i \, d x + 2 i \, c\right )} - 2 i \, a^{5} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+I*a*tan(d*x+c))^5,x, algorithm="fricas")

[Out]

1/2*(-I*a^5*e^(4*I*d*x + 4*I*c) + 2*I*a^5*e^(2*I*d*x + 2*I*c) - 2*I*a^5*log(e^(2*I*d*x + 2*I*c) + 1))/d

________________________________________________________________________________________

Sympy [A]  time = 0.935863, size = 82, normalized size = 1.12 \begin{align*} - 2 a^{5} \left (\begin{cases} - \frac{i e^{2 i d x}}{2 d} & \text{for}\: d \neq 0 \\x & \text{otherwise} \end{cases}\right ) e^{2 i c} + 2 a^{5} \left (\begin{cases} - \frac{i e^{4 i d x}}{4 d} & \text{for}\: d \neq 0 \\x & \text{otherwise} \end{cases}\right ) e^{4 i c} - \frac{i a^{5} \log{\left (e^{2 i d x} + e^{- 2 i c} \right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4*(a+I*a*tan(d*x+c))**5,x)

[Out]

-2*a**5*Piecewise((-I*exp(2*I*d*x)/(2*d), Ne(d, 0)), (x, True))*exp(2*I*c) + 2*a**5*Piecewise((-I*exp(4*I*d*x)
/(4*d), Ne(d, 0)), (x, True))*exp(4*I*c) - I*a**5*log(exp(2*I*d*x) + exp(-2*I*c))/d

________________________________________________________________________________________

Giac [B]  time = 1.55009, size = 608, normalized size = 8.33 \begin{align*} \frac{-384 i \, a^{5} e^{\left (16 i \, d x + 8 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 3072 i \, a^{5} e^{\left (14 i \, d x + 6 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 10752 i \, a^{5} e^{\left (12 i \, d x + 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 21504 i \, a^{5} e^{\left (10 i \, d x + 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 21504 i \, a^{5} e^{\left (6 i \, d x - 2 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 10752 i \, a^{5} e^{\left (4 i \, d x - 4 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 3072 i \, a^{5} e^{\left (2 i \, d x - 6 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 26880 i \, a^{5} e^{\left (8 i \, d x\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 384 i \, a^{5} e^{\left (-8 i \, c\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} + 1\right ) - 192 i \, a^{5} e^{\left (20 i \, d x + 12 i \, c\right )} - 1152 i \, a^{5} e^{\left (18 i \, d x + 10 i \, c\right )} - 2304 i \, a^{5} e^{\left (16 i \, d x + 8 i \, c\right )} + 8064 i \, a^{5} e^{\left (12 i \, d x + 4 i \, c\right )} + 16128 i \, a^{5} e^{\left (10 i \, d x + 2 i \, c\right )} + 9216 i \, a^{5} e^{\left (6 i \, d x - 2 i \, c\right )} + 2880 i \, a^{5} e^{\left (4 i \, d x - 4 i \, c\right )} + 384 i \, a^{5} e^{\left (2 i \, d x - 6 i \, c\right )} + 16128 i \, a^{5} e^{\left (8 i \, d x\right )}}{384 \,{\left (d e^{\left (16 i \, d x + 8 i \, c\right )} + 8 \, d e^{\left (14 i \, d x + 6 i \, c\right )} + 28 \, d e^{\left (12 i \, d x + 4 i \, c\right )} + 56 \, d e^{\left (10 i \, d x + 2 i \, c\right )} + 56 \, d e^{\left (6 i \, d x - 2 i \, c\right )} + 28 \, d e^{\left (4 i \, d x - 4 i \, c\right )} + 8 \, d e^{\left (2 i \, d x - 6 i \, c\right )} + 70 \, d e^{\left (8 i \, d x\right )} + d e^{\left (-8 i \, c\right )}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4*(a+I*a*tan(d*x+c))^5,x, algorithm="giac")

[Out]

1/384*(-384*I*a^5*e^(16*I*d*x + 8*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 3072*I*a^5*e^(14*I*d*x + 6*I*c)*log(e^(2
*I*d*x + 2*I*c) + 1) - 10752*I*a^5*e^(12*I*d*x + 4*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 21504*I*a^5*e^(10*I*d*x
 + 2*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 21504*I*a^5*e^(6*I*d*x - 2*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 10752*
I*a^5*e^(4*I*d*x - 4*I*c)*log(e^(2*I*d*x + 2*I*c) + 1) - 3072*I*a^5*e^(2*I*d*x - 6*I*c)*log(e^(2*I*d*x + 2*I*c
) + 1) - 26880*I*a^5*e^(8*I*d*x)*log(e^(2*I*d*x + 2*I*c) + 1) - 384*I*a^5*e^(-8*I*c)*log(e^(2*I*d*x + 2*I*c) +
 1) - 192*I*a^5*e^(20*I*d*x + 12*I*c) - 1152*I*a^5*e^(18*I*d*x + 10*I*c) - 2304*I*a^5*e^(16*I*d*x + 8*I*c) + 8
064*I*a^5*e^(12*I*d*x + 4*I*c) + 16128*I*a^5*e^(10*I*d*x + 2*I*c) + 9216*I*a^5*e^(6*I*d*x - 2*I*c) + 2880*I*a^
5*e^(4*I*d*x - 4*I*c) + 384*I*a^5*e^(2*I*d*x - 6*I*c) + 16128*I*a^5*e^(8*I*d*x))/(d*e^(16*I*d*x + 8*I*c) + 8*d
*e^(14*I*d*x + 6*I*c) + 28*d*e^(12*I*d*x + 4*I*c) + 56*d*e^(10*I*d*x + 2*I*c) + 56*d*e^(6*I*d*x - 2*I*c) + 28*
d*e^(4*I*d*x - 4*I*c) + 8*d*e^(2*I*d*x - 6*I*c) + 70*d*e^(8*I*d*x) + d*e^(-8*I*c))